package com.ws.lv.service.impl;

import com.ws.lv.bean.Image;
import com.ws.lv.mapper.ImageMapper;
import com.ws.lv.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ImageServiceImpl implements ImageService {

    @Autowired
    ImageMapper imageMapper;

    @Override
    public int insertImage(Image image) {
        return imageMapper.insertImage(image);
    }

    @Override
    public List<Image> selectImages(String route_name, Integer image_state) {
        return imageMapper.selectImages(route_name,image_state);
    }

    @Override
    public int updateImageDisplay(int image_id) {
        return imageMapper.updateImageDisplay(image_id);
    }

    @Override
    public int updateImageHide(int image_id) {
        return imageMapper.updateImageHide(image_id);
    }

    @Override
    public int deleteImages(ArrayList<Integer> image_ids) {
        return imageMapper.deleteImages(image_ids);
    }

    @Override
    public Image selectImageById(int route_id) {
        return imageMapper.selectImageById(route_id);
    }

    @Override
    public int updateImage(Image image) {
        return imageMapper.updateImage(image);
    }

    @Override
    public List<Image> selectImageByRouteId(int route_id) {
        return imageMapper.selectImageByRouteId(route_id);
    }

    @Override
    public int deleteImageByRouteIds(ArrayList<Integer> route_ids) {
        return imageMapper.deleteImageByRouteIds(route_ids);
    }

    @Override
    public List<Image> selectImagesByRouteId(int route_id) {
        return imageMapper.selectImagesByRouteId(route_id);
    }


}
